﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TCCCompiler;
using TCCHWLib;

namespace TCCEmulator
{
    public partial class PrototypeCompilerForm : Form
    {
        private Compiler m_Compiler;

        public PrototypeCompilerForm()
        {
            InitializeComponent();
            InitializeForm();
        }

        private void InitializeForm()
        {
            m_Compiler = new Compiler();
        }

        private void btnCompile_Click(object sender, EventArgs e)
        {
            string[] lines = txtEditor.Lines;
            List<ICommand> commandList = m_Compiler.Compile(lines);
            MessageBox.Show(commandList.Count + " commands produced!");
        }
    }
}
